package truedano.truedano;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.widget.*;

public class MyIntentNext extends Activity {
	TextView result;
	Button return_btn;
	
	private void setView(){
		result = (TextView)findViewById(R.id.result);
		return_btn = (Button)findViewById(R.id.return_btn);
		
		Intent intent = getIntent();
		String s = intent.getStringExtra("truedano");
		result.setText(s);
		//Toast.makeText(this, "get : "+s, Toast.LENGTH_SHORT).show();
		new MyUtil().ToastShow(getApplicationContext(), "get : "+s);
	}
	
	private void setListener(){
		return_btn.setOnClickListener(new Button.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intent = new Intent(MyIntentNext.this,MyIntent.class);
				startActivity(intent);
			}
		});
	}
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.my_intent_next);
		setView();
		setListener();
		
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.my_intent_next, menu);
		return true;
	}
	
}
